﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using XinHeWechat.Model;
using XinHeWechat.Server;

namespace XinHeWechat.Api.Controllers
{
    /// <summary>
    /// 微信身份认证
    /// </summary>
    public class HouseOwnerIdentityController : ApiController
    {
        /// <summary>
        /// 微信身份认证
        /// </summary>
        /// <param name="reqData"></param>
        /// <returns></returns>
        [HttpPost]
        public BaseResponse<string> Identity(IdentityRequest reqData)
        {
            BaseResponse<string> result = new BaseResponse<string>();
            string msg;
            bool isOk = HouseOwnerIdentityServer.Instance.Identity(reqData, out msg);
            result.msg = msg;

            if (isOk)
            {
                result.code = 0;
            }

            return result;
        }
    }
}
